home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / gfx / jpegv6bi.lha / jpegaga / CreateMapBig < prev   
AmigaDOS Script File  |  1995-04-10  |  901b  |  45 lines

  1. .key source/a,option
  2. .bra {
  3. .ket }
  4.  
  5. ;$VER: CreateMapBig 1.1 (10.4.95)
  6.  
  7. ;This shell script creates the .map files for jpegAGA
  8. ;for small pictures (e.g. 320x200) use the CreateMap script
  9.  
  10. ;Features of this version
  11. ;- file names with spaces are supported
  12. ;- mapfile creation is much faster but you will need djpeg from the
  13. ;  JPEG V5 distribution (Aminet: gfx/conv)
  14.  
  15.  
  16.  
  17. ;USAGE: CreateMapBig file
  18.  
  19. ;NOTE: You need a directory JPEGTMP: on your hard disk
  20. ;      (and enough space on that partition)
  21.  
  22.  
  23. FailAt 21
  24.  
  25. djpeg -pnm -outfile JPEGTMP:temp.ppm -scale 1/2 "{source}"
  26.  
  27. IF ERROR
  28.  
  29.   delete >NIL: JPEGTMP:temp.ppm
  30.   echo "Fatal error: could not decode JPEG file."
  31.   QUIT 20
  32.  
  33. ENDIF
  34.  
  35. ppm2aga JPEGTMP:temp.ppm "{source}.map" -jpegAGA {option}
  36.  
  37. IF ERROR
  38.   delete >NIL: JPEGTMP:temp.ppm
  39.   delete >NIL: "{source}.map"
  40.   echo "Fatal error: could not create map file."
  41.   QUIT 20
  42. ENDIF
  43.  
  44. delete >NIL: JPEGTMP:temp.ppm
  45.